<template>
    <div>
        <a
            :href="'tel:'+ phone"
            class="service"
        >
            <img src="../asset/icon/icon_home_service.png">
            <p>联系客服</p>
        </a>
    </div>
</template>
<script>
export default {
    name: "service",
    data() {
        return {
            phone: ''
        };
    },
    methods: {
        // 方法
        infoData() {
            let params = {};
            this.$post("Sysconfig/getSysConfig", params)
                .then(res => {
                    if (res.code === 20000) {
                        this.phone = res.data.contacts_phone
                    }
                })
                .catch(err => { });
        }
    },
    created() {
        // 实例创建完成
        this.infoData();
    },
};
</script>
<style lang="less" scoped>
.service {
    position: fixed;
    right: 12px;
    bottom: 70px;
    width: 76px;
    height: 76px;
    border-radius: 76px;
    background-color: #38c6ff;
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    img {
        width: 26px;
    }
    p {
        margin-top: 5px;
        font-size: 13px;
        color: #ffffff;
    }
}
</style>